﻿using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using DiamondDesktop.Model;
namespace DiamondDesktop.Views
{
	public partial class TaskItemView
	{
        private Reminder r;

		public TaskItemView()
		{
			this.InitializeComponent();

			// 在此点之下插入创建对象所需的代码。
            r = Reminder.getInstance();

        }

        //标记任务完成按钮被点击
        private void finish_Button_Click(object sender, RoutedEventArgs e)
        {
            Task t = DataContext as Task;
            t.setCompleted();
            r.modifyTask(t);
        }

        //删除任务按钮被点击
        private void delete_Button_Click(object sender, RoutedEventArgs e)
        {
            Task t = DataContext as Task;
            r.deleteTask(t);

        }

	}
}